//
//  BaseModel.m
//  HeartTravel
//
//  Created by dlios on 15-6-29.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel

- (void)dealloc{
    [_bId release];
    [super dealloc];
}

- (id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}

- (instancetype)initWithDic:(NSDictionary *)dic{
    
    self = [super init];
    if (self) {
        //KVC 赋值方法
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
    //id
    if ([key isEqualToString:@"id"]) {
        self.bId = value;
    }
    
    if ([key isEqualToString:@"description"]) {
        self.bDescription = value;
    }
    
    
}



@end
